<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld"%>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld"%>
<c:if test="${not empty param.msg}">
	<script type="text/javascript" language="javascript">
		alert("${param.msg}");
		location.href="OrderManageServlet?act=orderItem&fromPage=/Admin/Admin_Orderitem.jsp&orderId=${param.orderId}";
	</script>
</c:if>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>shop 管理中心 - 订单详细信息修改</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link href="<c:url value='/Admin/styles/general.css' />" rel="stylesheet" type="text/css" />
	<link href="<c:url value='/Admin/styles/main.css' />" rel="stylesheet" type="text/css" />
	<script language="javascript">
		function ssendselected(ssendtype) {
			if(ssendtype=="普通包裹") {
				eidtOrder.ssendtype.options[0].selected=true;
			} else if(ssendtype=="特快专递") {
				eidtOrder.ssendtype.options[1].selected=true;
			} else if(ssendtype=="EMS快递") {
				eidtOrder.ssendtype.options[2].selected=true;
			}
		}
		
		function spayselected(spaytype) {
			if(spaytype=="在线支付") {
				eidtOrder.spaytype.options[0].selected=true;
			} else if(spaytype=="支付宝") {
				eidtOrder.spaytype.options[1].selected=true;
			} else if(spaytype=="快钱支付") {
				eidtOrder.spaytype.options[2].selected=true;
			}
		}
	</script>

  </head>
  
  <body>
    <h1>
		<span><a href="Admin_Main.jsp">Shop 订单管理</a> - 订单详细信息修改 </span>
	</h1>
	<div class="main-div1">
		<table width="100%" class="btable">
			<tr>
				<td>
				<form name="eidtOrder" action="OrderManageServlet" method="post"> 
				<input type="hidden" name="act" value="eidtOrder" />
				<input type="hidden" name="orderId" value="${orderBean.nid}" />
				<input type="hidden" name="fromPage" value="/Admin/Admin_Editorder.jsp" />
					<table border="0" align="center" cellpadding="0" cellspacing="0" class="orderitemtable">
						<tr>
							<th>
								所属用户：
							</th>
							<td>
								${orderBean.scuser}&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								真实姓名：
							</th>
							<td>
								<input type="text" name ="ssname" value="${orderBean.ssname}" />&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								邮政编码：
							</th>
							<td>
								<input type="text" name ="sscode" value="${orderBean.sscode}" />&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								电子邮箱：
							</th>
							<td>
								<input type="text" name ="ssemail" value="${orderBean.ssemail}" />&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								电话号码：
							</th>
							<td>
								<input type="text" name ="ssphone" value="${orderBean.ssphone}" />&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								联系地址：
							</th>
							<td>
								<input type="text" name ="ssaddress" value="${orderBean.ssaddress}" />&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								下单时间：
							</th>
							<td>
								${orderBean.dgdate}&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								发货方式：
							</th>
							<td>
								<select name="ssendtype" style="width:130px;">
                                <option value="普通包裹">普通包裹</option>
                                <option value="特快专递">特快专递</option>
                                <option value="EMS快递">EMS快递</option>
                                </select>&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								付款方式：
							</th>
							<td>
								<select name="spaytype" style="width:130px;">
                                <option value="在线支付">在线支付</option>
                                <option value="支付宝">支付宝</option>
                                <option value="快钱支付">快钱支付</option>
                                </select>&nbsp;
							</td>
						</tr>
						<tr>
							<th>
								审核情况：
							</th>
							<td style="color:red;">
								${orderBean.sstatus}&nbsp;
							</td>
						</tr>
						<tr>
							<td colspan="2" style="padding-left:40%;">
								<input type="submit" name="submit" value="确定修改" /> &nbsp;
								<input type="reset" name="reset" value="重置" />
							</td>
						</tr>
					</table>
				</form>
				</td>
			</tr>
		</table>
	</div>
	<script type="text/javascript">
           window.onload = function()
           {
             ssendselected('${orderBean.ssendtype}');
             spayselected('${orderBean.spaytype}');
           }
       </script>
	<div class="list-div" id="listDiv">
	<table cellpadding="0" cellspacing="1">
	  <tr>
		<th>商品图片</th>
		<th>商品编号</th>
		<th>商品名称</th>
		<th>商品单价</th>
		<th>商品数量</th>
	  </tr>
	<c:forEach var="orderItemBean" items="${orderItemList}">
	  <tr>
		<td align="center">
		<img src="<c:url value='/mcimg/${orderItemBean.simg}' />" class="cimg" />&nbsp;
		</td>
		<td align="center">
		${orderItemBean.nmcid}&nbsp;
		</td>
		<td align="center">
		${orderItemBean.smcname}&nbsp;
		</td>
		<td align="center" style="color:red;">
		￥${orderItemBean.nprice}&nbsp;
		</td>
		<td align="center">
		${orderItemBean.ncount}&nbsp;
		</td>
	  </tr>
	</c:forEach>
	  <tr>
		<td colspan="5" style="color:red;" align="right">合计：￥${orderBean.ntotalprice}&nbsp;</td>
	  </tr>
	  <tr>
		<td colspan="5" align="center" style="border:0px;padding-top:5px;"><input type="button" onclick="javasctipr:history.back();" value="返回上一页" /></td>
	  </tr>
	</table>
	</div>
	<div id="footer">
		版权所有 &copy;
	</div>
  </body>
</html>
